<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>搜可得</title>

  <link rel="stylesheet" href="css/style.css" media="screen" type="text/css"/>
  <style type="text/css">
  	body{
  		background: url(img/bg.jpg) no-repeat center center;
	    background-size: cover;
	    background-attachment: fixed;
	    background-color: #CCCCCC;
  	}
    .container { margin: 300px auto; width: 600px; text-align: center; }

    input{
      font-size: 13px;
      min-height: 32px;
      margin: 0;
      padding: 7px 8px;
      outline: none;
      color: #333;
      background-color: #fff;
      background-repeat: no-repeat;
      background-position: right center;
      border: 1px solid #ccc;
      border-radius: 3px;
      box-shadow: inset 0 1px 2px rgba(0,0,0,0.075);
      -moz-box-sizing: border-box;
      box-sizing: border-box;
      transition: all 0.15s ease-in;
      -webkit-transition: all 0.15s ease-in 0;
      vertical-align: middle;
    }
    #search label {
      font-weight: 200;
      padding: 5px 0;
    }
    #search input[type=text] {
      font-size: 18px;
      width: 705px;
    }
    #search .button {
      padding: 10px;
      width: 90px;
    }
  </style>

  <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.slim.js"></script>
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
  <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>

<body>
	<div class="container">
		<div id="logo" style="margin: 30px 10px;">
			<img src="img/logo.png">
		</div>
		<div id="search">
		    <input id="searchText" type="text" name="search" placeholder="微信公众号文章搜索">
		    <button id="searchBtn" type="button" class="button btn btn-success">搜索</button>
		</div>
	</div>
</body>
<script type="text/javascript">
	$("#searchBtn").click(function(){
		var keyword = $("#searchText").val();
		var baseUrl = "http://weixin.sogou.com/weixin?type=2&s_from=input&query=KEYWORD&ie=utf8&_sug_=y&_sug_type_=&w=01019900&sut=1718&sst0=1528196324977&lkt=1%2C1528196324874%2C1528196324874";
		baseUrl = baseUrl.replace("KEYWORD", keyword);
		window.location.href = baseUrl;
	});

</script>
</html>